//根据积分计算折扣那题（x为积分)：
//x ＜ 2000	        9折
//2000 ≤ x ＜ 4000	8折
//4000 ≤ x ＜ 8000	7折
//x ≥ 8000	        6折
//输入用户的积分，输出他获得的折扣
public class homework23 {
    public static void main(String[] args) {
        double x = Double.parseDouble(args[0]);
        double discount = 0;
        if (x < 2000) {
            discount = 0.9;
        } else if (x >= 2000 && x < 4000) {
            discount = 0.8;
        } else if (x >= 4000 && x < 8000) {
            discount = 0.7;
        } else {
            discount = 0.6;
        }
        double result = x * discount;
        System.out.println("折扣为：" + discount + "折");
        System.out.println("折后价格为：" + result);
    }
}
